package com.youlai.boot.factory.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDate;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;

/**
 * 月度结算单表单对象
 *
 * @author youlaitech
 * @since 2025-07-13 00:16
 */
@Getter
@Setter
@Schema(description = "月度结算单表单对象")
public class MonthlySettlementsForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @NotNull(message = "不能为空")
    private Integer id;

    @Schema(description = "结算单编号(如JS202307001)")
    @NotBlank(message = "结算单编号(如JS202307001)不能为空")
    @Size(max=20, message="结算单编号(如JS202307001)长度不能超过20个字符")
    private String settlementNumber;

    @Schema(description = "客户ID")
    @NotNull(message = "客户ID不能为空")
    private Integer customerId;

    @Schema(description = "结算单名称")
    @NotBlank(message = "结算单名称不能为空")
    @Size(max=100, message="结算单名称长度不能超过100个字符")
    private String settlementName;

    @Schema(description = "结算年月(YYYY-MM)")
    @NotBlank(message = "结算年月(YYYY-MM)不能为空")
    @Size(max=7, message="结算年月(YYYY-MM)长度不能超过7个字符")
    private String yearMonth;

    @Schema(description = "结算开始日期")
    private LocalDate startDate;

    @Schema(description = "结算结束日期")
    private LocalDate endDate;

    @Schema(description = "总数量")
    private Integer totalQuantity;

    @Schema(description = "总金额")
    private BigDecimal totalAmount;

    @Schema(description = "状态:0-草稿 1-已确认 2-已付款")
    private Integer status;

    @Schema(description = "备注")
    @Size(max=65535, message="备注长度不能超过65535个字符")
    private String remark;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改人ID")
    private Long updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


}
